import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

public class Test1 {

	public static void main(String[] args) throws Exception {
//		String strURL= URLEncoder.encode(URL, ENCODING).replace("*","*").replace("~", "~").replace("+"," ");
//		String urlStr = "http://10.101.2.85:8580/face/UploadImg?testkey=0&imgSize=200k";
		String urlStr = "http://10.101.2.85:8580/face/uploadImgByClient.action";
		
		System.out.println(urlStr);
		
		String enCodeStr = java.net.URLEncoder.encode(urlStr, "utf-8");
		
		System.out.println(enCodeStr);
		
		String deCodeStr = java.net.URLDecoder.decode(enCodeStr, "utf-8");
		
		System.out.println(deCodeStr);
		
		System.out.println(urlStr.equals(deCodeStr));
	}
	
}
